
void setup() {                
  pinMode(11, OUTPUT); 
  pinMode(12, OUTPUT); 
  Serial.begin(9600);  
}

int curMinute = 0;
int curHour = 0;

void stepHour(int led, int n)
{
  Serial.print("Carl "); 
  Serial.println(n); 
  for (int i=1;i<=n;i++)
 { 
  curHour++;
  digitalWrite(led, HIGH);   
  delay(20);               
  digitalWrite(led, LOW);   
  delay(100); 
 }  
 if(curHour == 24) curHour = 0;
}
void stepMinute(int led, int n)
{

  for (int i=1;i<=n;i++)
 { 
  curMinute++;
  digitalWrite(led, HIGH);   
  delay(40);               
  digitalWrite(led, LOW);    
  delay(200); 
 }  
 if(curMinute == 60) curMinute = 0;
}

void resetHour()
{
  stepHour(11,24-curHour);
}
void resetMinute()
{
  stepHour(11,60-curMinute);
}
void loop() {
  stepHour(11,3);
  stepMinute(11,3);
  delay(3000);
  resetHour();
  resetMinute();
  delay(3000);
}
